# _*_ coding ：utf-8 _*_
# @Time : 2023/9/21 14:44
# @Author : 计科1914-02-陈鸿宇
# @File : 4.5
# @Project : 作业
import random
list1 = []
dmd = ""
with open("名单1.txt", "r", encoding='utf-8-sig') as f:
    for i in f.read().split("\n"):
        list1.append(i)
    dmd = random.sample(list1, 1)[0]
    print(dmd)
    list1.remove(dmd)


with open("名单1.txt", "w",encoding='utf-8-sig') as f:
    for i in list1:
        f.write(i+"\n")


